< Summary

Class:GDX.Tables.StableTable
Assembly:GDX
File(s):D:/BuildAgent/work/GDX-Documentation/Projects/GDX_Development/Packages/com.dotbunny.gdx/GDX/Tables/StableTable.cs
Covered lines:0
Uncovered lines:786
Coverable lines:786
Total lines:1283
Line coverage:0% (0 of 786)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:135
Method coverage:0% (0 of 135)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
StableTable()0%2100%
GetDataVersion()0%2100%
GetColumnCount()0%2100%
GetRowCount()0%2100%
GetOrderedColumns()0%42600%
AddRow(...)0%30500%
AddRows(...)0%90900%
RemoveRow(...)0%6200%
RemoveRows(...)0%6200%
AddColumn(...)0%9923100%
RemoveColumn(...)0%9303000%
SetString(...)0%2100%
SetBool(...)0%2100%
SetChar(...)0%2100%
SetSByte(...)0%2100%
SetByte(...)0%2100%
SetShort(...)0%2100%
SetUShort(...)0%2100%
SetInt(...)0%2100%
SetUInt(...)0%2100%
SetLong(...)0%2100%
SetULong(...)0%2100%
SetFloat(...)0%2100%
SetDouble(...)0%2100%
SetVector2(...)0%2100%
SetVector3(...)0%2100%
SetVector4(...)0%2100%
SetVector2Int(...)0%2100%
SetVector3Int(...)0%2100%
SetQuaternion(...)0%2100%
SetRect(...)0%2100%
SetRectInt(...)0%2100%
SetColor(...)0%2100%
SetLayerMask(...)0%2100%
SetBounds(...)0%2100%
SetBoundsInt(...)0%2100%
SetHash128(...)0%2100%
SetGradient(...)0%2100%
SetAnimationCurve(...)0%2100%
SetObject(...)0%2100%
GetString(...)0%2100%
GetBool(...)0%2100%
GetChar(...)0%2100%
GetSByte(...)0%2100%
GetByte(...)0%2100%
GetShort(...)0%2100%
GetUShort(...)0%2100%
GetInt(...)0%2100%
GetUInt(...)0%2100%
GetLong(...)0%2100%
GetULong(...)0%2100%
GetFloat(...)0%2100%
GetDouble(...)0%2100%
GetVector2(...)0%2100%
GetVector3(...)0%2100%
GetVector4(...)0%2100%
GetVector2Int(...)0%2100%
GetVector3Int(...)0%2100%
GetQuaternion(...)0%2100%
GetRect(...)0%2100%
GetRectInt(...)0%2100%
GetColor(...)0%2100%
GetLayerMask(...)0%2100%
GetBounds(...)0%2100%
GetBoundsInt(...)0%2100%
GetHash128(...)0%2100%
GetGradient(...)0%2100%
GetAnimationCurve(...)0%2100%
GetObject(...)0%2100%
GetStringRef(...)0%2100%
GetBoolRef(...)0%2100%
GetCharRef(...)0%2100%
GetSbyteRef(...)0%2100%
GetByteRef(...)0%2100%
GetShortRef(...)0%2100%
GetUshortRef(...)0%2100%
GetIntRef(...)0%2100%
GetUintRef(...)0%2100%
GetLongRef(...)0%2100%
GetUlongRef(...)0%2100%
GetFloatRef(...)0%2100%
GetDoubleRef(...)0%2100%
GetVector2Ref(...)0%2100%
GetVector3Ref(...)0%2100%
GetVector4Ref(...)0%2100%
GetVector2IntRef(...)0%2100%
GetVector3IntRef(...)0%2100%
GetQuaternionRef(...)0%2100%
GetRectRef(...)0%2100%
GetRectIntRef(...)0%2100%
GetColorRef(...)0%2100%
GetLayerMaskRef(...)0%2100%
GetBoundsRef(...)0%2100%
GetBoundsIntRef(...)0%2100%
GetHash128Ref(...)0%2100%
GetGradientRef(...)0%2100%
GetAnimationCurveRef(...)0%2100%
GetObjectRef(...)0%2100%
GetStringColumn(...)0%2100%
GetBoolColumn(...)0%2100%
GetCharColumn(...)0%2100%
GetSbyteColumn(...)0%2100%
GetByteColumn(...)0%2100%
GetShortColumn(...)0%2100%
GetUshortColumn(...)0%2100%
GetIntColumn(...)0%2100%
GetUintColumn(...)0%2100%
GetLongColumn(...)0%2100%
GetUlongColumn(...)0%2100%
GetFloatColumn(...)0%2100%
GetDoubleColumn(...)0%2100%
GetVector2Column(...)0%2100%
GetVector3Column(...)0%2100%
GetVector4Column(...)0%2100%
GetVector2IntColumn(...)0%2100%
GetVector3IntColumn(...)0%2100%
GetQuaternionColumn(...)0%2100%
GetRectColumn(...)0%2100%
GetRectIntColumn(...)0%2100%
GetColorColumn(...)0%2100%
GetLayerMaskColumn(...)0%2100%
GetBoundsColumn(...)0%2100%
GetBoundsIntColumn(...)0%2100%
GetHash128Column(...)0%2100%
GetGradientColumn(...)0%2100%
GetAnimationCurveColumn(...)0%2100%
GetObjectColumn(...)0%2100%
AddColumnInternal[T](...)0%5062200%
RemoveColumnInternal[T](...)0%20400%
InsertRowsOfTypeInternal[T](...)0%42600%
DeleteRowsOfTypeInternal[T](...)0%30500%
GetCellRef[T](...)0%2100%
GetCell[T](...)0%2100%
SetCell[T](...)0%2100%
GetColumn[T](...)0%2100%

File(s)

D:/BuildAgent/work/GDX-Documentation/Projects/GDX_Development/Packages/com.dotbunny.gdx/GDX/Tables/StableTable.cs

#LineLine coverage
 1// Copyright (c) 2020-2023 dotBunny Inc.
 2// dotBunny licenses this file to you under the BSL-1.0 license.
 3// See the LICENSE file in the project root for more information.
 4
 5using System;
 6using GDX.Collections;
 7using UnityEngine;
 8
 9namespace GDX.Tables
 10{
 11
 12    [CreateAssetMenu(menuName = "GDX/Stable Table", fileName = "GDXStableTable")]
 13    [Serializable]
 14    public class StableTable : ScriptableObject, ITable
 15    {
 16        [Serializable]
 17        internal struct ColumnEntry
 18        {
 19            public Serializable.SerializableTypes ColumnType;
 20            public int columnDenseIndex;
 21        }
 22
 23        [SerializeField] internal ArrayHolder<string>[] allStringColumns;
 24        [SerializeField] internal ArrayHolder<bool>[] allBoolColumns;
 25        [SerializeField] internal ArrayHolder<char>[] allCharColumns;
 26        [SerializeField] internal ArrayHolder<sbyte>[] allSbyteColumns;
 27        [SerializeField] internal ArrayHolder<byte>[] allByteColumns;
 28        [SerializeField] internal ArrayHolder<short>[] allShortColumns;
 29        [SerializeField] internal ArrayHolder<ushort>[] allUshortColumns;
 30        [SerializeField] internal ArrayHolder<int>[] allIntColumns;
 31        [SerializeField] internal ArrayHolder<uint>[] allUintColumns;
 32        [SerializeField] internal ArrayHolder<long>[] allLongColumns;
 33        [SerializeField] internal ArrayHolder<ulong>[] allUlongColumns;
 34        [SerializeField] internal ArrayHolder<float>[] allFloatColumns;
 35        [SerializeField] internal ArrayHolder<double>[] allDoubleColumns;
 36        [SerializeField] internal ArrayHolder<Vector2>[] allVector2Columns;
 37        [SerializeField] internal ArrayHolder<Vector3>[] allVector3Columns;
 38        [SerializeField] internal ArrayHolder<Vector4>[] allVector4Columns;
 39        [SerializeField] internal ArrayHolder<Vector2Int>[] allVector2IntColumns;
 40        [SerializeField] internal ArrayHolder<Vector3Int>[] allVector3IntColumns;
 41        [SerializeField] internal ArrayHolder<Quaternion>[] allQuaternionColumns;
 42        [SerializeField] internal ArrayHolder<Rect>[] allRectColumns;
 43        [SerializeField] internal ArrayHolder<RectInt>[] allRectIntColumns;
 44        [SerializeField] internal ArrayHolder<Color>[] allColorColumns;
 45        [SerializeField] internal ArrayHolder<LayerMask>[] allLayerMaskColumns;
 46        [SerializeField] internal ArrayHolder<Bounds>[] allBoundsColumns;
 47        [SerializeField] internal ArrayHolder<BoundsInt>[] allBoundsIntColumns;
 48        [SerializeField] internal ArrayHolder<Hash128>[] allHash128Columns;
 49        [SerializeField] internal ArrayHolder<Gradient>[] allGradientColumns;
 50        [SerializeField] internal ArrayHolder<AnimationCurve>[] allAnimationCurveColumns;
 51        [SerializeField] internal ArrayHolder<UnityEngine.Object>[] allObjectRefColumns;
 052        [SerializeField] internal ArrayHolder<string>[] allColumnNames = new ArrayHolder<string>[Serializable.Serializab
 053        [SerializeField] internal ArrayHolder<int>[] allColumnOrders = new ArrayHolder<int>[Serializable.SerializableTyp
 54
 55
 56        [SerializeField] internal string[] allRowNames;
 57        [SerializeField] internal int[] rowIDToDenseIndexMap;
 58        [SerializeField] internal int[] rowDenseIndexToIDMap;
 59        [SerializeField] internal int rowEntriesFreeListHead;
 60
 61
 62        [SerializeField]
 63        internal int rowCount;
 64
 65        [SerializeField]
 66        internal ColumnEntry[] columnIDToDenseIndexMap;
 67
 68        // TODO move with other block
 069        [SerializeField] ArrayHolder<int>[] columnDenseIndexToIDMap = new ArrayHolder<int>[Serializable.SerializableType
 70
 71        [SerializeField]
 72        internal int columnEntriesFreeListHead;
 73
 74        [SerializeField]
 75        internal int combinedColumnCount;
 76
 77        [SerializeField]
 078        internal ulong dataVersion = 1;
 79
 80
 81        public ulong GetDataVersion()
 082        {
 083            return dataVersion;
 084        }
 85
 86        /// <inheritdoc />
 87        public int GetColumnCount()
 088        {
 089            return combinedColumnCount;
 090        }
 91
 92        /// <inheritdoc />
 93        public int GetRowCount()
 094        {
 095            return rowCount;
 096        }
 97
 98        public ITable.ColumnDescription[] GetOrderedColumns()
 099        {
 0100            if (combinedColumnCount == 0) return null;
 0101            ITable.ColumnDescription[] returnArray = new ITable.ColumnDescription[combinedColumnCount];
 102
 0103            for (int columnIndex = 0; columnIndex < Serializable.SerializableTypesCount; columnIndex++)
 0104            {
 105
 0106                int[] columnOrders = allColumnOrders[columnIndex].TArray;
 0107                int columnOrdersLength = columnOrders?.Length ?? 0;
 108
 0109                int[] columnIndices = columnDenseIndexToIDMap[columnIndex].TArray;
 0110                string[] columnNames = allColumnNames[columnIndex].TArray;
 111
 0112                for (int i = 0; i < columnOrdersLength; i++)
 0113                {
 0114                    returnArray[columnOrders[i]] = new ITable.ColumnDescription
 115                    {
 116                        Name =  columnNames[i],
 117                        Index = columnIndices[i],
 118                        Type = (Serializable.SerializableTypes)columnIndex
 119                    };
 0120                }
 0121            }
 0122            return returnArray;
 0123        }
 124
 125
 126        // END - View Hacks
 127
 128        // TODO: Way to set column name
 129
 130
 131
 132        public void AddRow(string rowName = null, int insertAt = -1)
 0133        {
 134            // TODO: For adam to do
 135            // int rowIndex = rowEntriesFreeListHead;
 136            // int rowIDToDenseIndexMapLength = rowIDToDenseIndexMap?.Length ?? 0;
 137            // if (rowIndex >= rowIDToDenseIndexMapLength)
 138            // {
 139            //     int newSize = rowIndex * 2;
 140            //     newSize = newSize == 0 ? 1 : newSize;
 141            //     Array.Resize(ref rowIDToDenseIndexMap, newSize);
 142            //     for (int i = 0; i < rowIndex; i++)
 143            //     {
 144            //         rowIDToDenseIndexMap[rowIndex + i] = rowIndex + i + 1;
 145            //     }
 146            // }
 147            // int denseIndexToIDMapLength = rowDenseIndexToIDMap?.Length ?? 0;
 148            // Array.Resize(ref rowDenseIndexToIDMap, denseIndexToIDMapLength + 1);
 149            //
 150            //
 151            // rowDenseIndexToIDMap[denseIndexToIDMapLength] = rowIndex;
 152
 153
 0154            insertAt = insertAt < 0 ? rowCount : insertAt;
 155
 0156            Array.Resize(ref allRowNames, rowCount + 1);
 0157            for (int i = rowCount; i > insertAt; i--)
 0158            {
 0159                allRowNames[i] = allRowNames[i - 1];
 0160            }
 161
 0162            rowName ??= string.Empty;
 0163            allRowNames[insertAt] = rowName;
 164
 0165            InsertRowsOfTypeInternal(ref allStringColumns, insertAt, 1);
 0166            InsertRowsOfTypeInternal(ref allBoolColumns, insertAt, 1);
 0167            InsertRowsOfTypeInternal(ref allCharColumns, insertAt, 1);
 0168            InsertRowsOfTypeInternal(ref allSbyteColumns, insertAt, 1);
 0169            InsertRowsOfTypeInternal(ref allByteColumns, insertAt, 1);
 0170            InsertRowsOfTypeInternal(ref allShortColumns, insertAt, 1);
 0171            InsertRowsOfTypeInternal(ref allUshortColumns, insertAt, 1);
 0172            InsertRowsOfTypeInternal(ref allIntColumns, insertAt, 1);
 0173            InsertRowsOfTypeInternal(ref allUintColumns, insertAt, 1);
 0174            InsertRowsOfTypeInternal(ref allLongColumns, insertAt, 1);
 0175            InsertRowsOfTypeInternal(ref allUlongColumns, insertAt, 1);
 0176            InsertRowsOfTypeInternal(ref allFloatColumns, insertAt, 1);
 0177            InsertRowsOfTypeInternal(ref allDoubleColumns, insertAt, 1);
 0178            InsertRowsOfTypeInternal(ref allVector2Columns, insertAt, 1);
 0179            InsertRowsOfTypeInternal(ref allVector3Columns, insertAt, 1);
 0180            InsertRowsOfTypeInternal(ref allVector4Columns, insertAt, 1);
 0181            InsertRowsOfTypeInternal(ref allVector2IntColumns, insertAt, 1);
 0182            InsertRowsOfTypeInternal(ref allVector3IntColumns, insertAt, 1);
 0183            InsertRowsOfTypeInternal(ref allQuaternionColumns, insertAt, 1);
 0184            InsertRowsOfTypeInternal(ref allRectColumns, insertAt, 1);
 0185            InsertRowsOfTypeInternal(ref allRectIntColumns, insertAt, 1);
 0186            InsertRowsOfTypeInternal(ref allColorColumns, insertAt, 1);
 0187            InsertRowsOfTypeInternal(ref allLayerMaskColumns, insertAt, 1);
 0188            InsertRowsOfTypeInternal(ref allBoundsColumns, insertAt, 1);
 0189            InsertRowsOfTypeInternal(ref allBoundsIntColumns, insertAt, 1);
 0190            InsertRowsOfTypeInternal(ref allHash128Columns, insertAt, 1);
 0191            InsertRowsOfTypeInternal(ref allGradientColumns, insertAt, 1);
 0192            InsertRowsOfTypeInternal(ref allAnimationCurveColumns, insertAt, 1);
 0193            InsertRowsOfTypeInternal(ref allObjectRefColumns, insertAt, 1);
 194
 0195            ++rowCount;
 0196            dataVersion++;
 0197        }
 198
 199        public void AddRows(int numberOfNewRows, string[] rowNames = null, int insertAt = -1)
 0200        {
 0201            insertAt = insertAt < 0 ? rowCount : insertAt;
 202
 0203            Array.Resize(ref allRowNames, rowCount + 1);
 0204            for (int i = rowCount; i > insertAt; i--)
 0205            {
 0206                allRowNames[i] = allRowNames[i - 1];
 0207            }
 208
 0209            string empty = string.Empty;
 0210            int rowNamesLength = rowNames?.Length ?? 0;
 0211            for (int i = 0; i < rowNames.Length; i++)
 0212            {
 0213                string nameAt = rowNames[i];
 0214                allRowNames[insertAt + i] = nameAt ?? empty;
 0215            }
 216
 0217            for (int i = rowNamesLength; i < numberOfNewRows; i++)
 0218            {
 0219                allRowNames[insertAt + i] = empty;
 0220            }
 221
 0222            InsertRowsOfTypeInternal(ref allStringColumns, insertAt, numberOfNewRows);
 0223            InsertRowsOfTypeInternal(ref allBoolColumns, insertAt, numberOfNewRows);
 0224            InsertRowsOfTypeInternal(ref allCharColumns, insertAt, numberOfNewRows);
 0225            InsertRowsOfTypeInternal(ref allSbyteColumns, insertAt, numberOfNewRows);
 0226            InsertRowsOfTypeInternal(ref allByteColumns, insertAt, numberOfNewRows);
 0227            InsertRowsOfTypeInternal(ref allShortColumns, insertAt, numberOfNewRows);
 0228            InsertRowsOfTypeInternal(ref allUshortColumns, insertAt, numberOfNewRows);
 0229            InsertRowsOfTypeInternal(ref allIntColumns, insertAt, numberOfNewRows);
 0230            InsertRowsOfTypeInternal(ref allUintColumns, insertAt, numberOfNewRows);
 0231            InsertRowsOfTypeInternal(ref allLongColumns, insertAt, numberOfNewRows);
 0232            InsertRowsOfTypeInternal(ref allUlongColumns, insertAt, numberOfNewRows);
 0233            InsertRowsOfTypeInternal(ref allFloatColumns, insertAt, numberOfNewRows);
 0234            InsertRowsOfTypeInternal(ref allDoubleColumns, insertAt, numberOfNewRows);
 0235            InsertRowsOfTypeInternal(ref allVector2Columns, insertAt, numberOfNewRows);
 0236            InsertRowsOfTypeInternal(ref allVector3Columns, insertAt, numberOfNewRows);
 0237            InsertRowsOfTypeInternal(ref allVector4Columns, insertAt, numberOfNewRows);
 0238            InsertRowsOfTypeInternal(ref allVector2IntColumns, insertAt, numberOfNewRows);
 0239            InsertRowsOfTypeInternal(ref allVector3IntColumns, insertAt, numberOfNewRows);
 0240            InsertRowsOfTypeInternal(ref allQuaternionColumns, insertAt, numberOfNewRows);
 0241            InsertRowsOfTypeInternal(ref allRectColumns, insertAt, numberOfNewRows);
 0242            InsertRowsOfTypeInternal(ref allRectIntColumns, insertAt, numberOfNewRows);
 0243            InsertRowsOfTypeInternal(ref allColorColumns, insertAt, numberOfNewRows);
 0244            InsertRowsOfTypeInternal(ref allLayerMaskColumns, insertAt, numberOfNewRows);
 0245            InsertRowsOfTypeInternal(ref allBoundsColumns, insertAt, numberOfNewRows);
 0246            InsertRowsOfTypeInternal(ref allBoundsIntColumns, insertAt, numberOfNewRows);
 0247            InsertRowsOfTypeInternal(ref allHash128Columns, insertAt, numberOfNewRows);
 0248            InsertRowsOfTypeInternal(ref allGradientColumns, insertAt, numberOfNewRows);
 0249            InsertRowsOfTypeInternal(ref allAnimationCurveColumns, insertAt, numberOfNewRows);
 0250            InsertRowsOfTypeInternal(ref allObjectRefColumns, insertAt, numberOfNewRows);
 251
 0252            rowCount += numberOfNewRows;
 0253            dataVersion++;
 0254        }
 255
 256        public void RemoveRow(int removeAt)
 0257        {
 0258            int newRowCount = rowCount - 1;
 0259            for (int j = removeAt; j < newRowCount; j++)
 0260            {
 0261                allRowNames[j] = allRowNames[j + 1];
 0262            }
 263
 0264            Array.Resize(ref allRowNames, newRowCount);
 265
 0266            DeleteRowsOfTypeInternal(ref allStringColumns, removeAt, 1);
 0267            DeleteRowsOfTypeInternal(ref allBoolColumns, removeAt, 1);
 0268            DeleteRowsOfTypeInternal(ref allCharColumns, removeAt, 1);
 0269            DeleteRowsOfTypeInternal(ref allSbyteColumns, removeAt, 1);
 0270            DeleteRowsOfTypeInternal(ref allByteColumns, removeAt, 1);
 0271            DeleteRowsOfTypeInternal(ref allShortColumns, removeAt, 1);
 0272            DeleteRowsOfTypeInternal(ref allUshortColumns, removeAt, 1);
 0273            DeleteRowsOfTypeInternal(ref allIntColumns, removeAt, 1);
 0274            DeleteRowsOfTypeInternal(ref allUintColumns, removeAt, 1);
 0275            DeleteRowsOfTypeInternal(ref allLongColumns, removeAt, 1);
 0276            DeleteRowsOfTypeInternal(ref allUlongColumns, removeAt, 1);
 0277            DeleteRowsOfTypeInternal(ref allFloatColumns, removeAt, 1);
 0278            DeleteRowsOfTypeInternal(ref allDoubleColumns, removeAt, 1);
 0279            DeleteRowsOfTypeInternal(ref allVector2Columns, removeAt, 1);
 0280            DeleteRowsOfTypeInternal(ref allVector3Columns, removeAt, 1);
 0281            DeleteRowsOfTypeInternal(ref allVector4Columns, removeAt, 1);
 0282            DeleteRowsOfTypeInternal(ref allVector2IntColumns, removeAt, 1);
 0283            DeleteRowsOfTypeInternal(ref allVector3IntColumns, removeAt, 1);
 0284            DeleteRowsOfTypeInternal(ref allQuaternionColumns, removeAt, 1);
 0285            DeleteRowsOfTypeInternal(ref allRectColumns, removeAt, 1);
 0286            DeleteRowsOfTypeInternal(ref allRectIntColumns, removeAt, 1);
 0287            DeleteRowsOfTypeInternal(ref allColorColumns, removeAt, 1);
 0288            DeleteRowsOfTypeInternal(ref allLayerMaskColumns, removeAt, 1);
 0289            DeleteRowsOfTypeInternal(ref allBoundsColumns, removeAt, 1);
 0290            DeleteRowsOfTypeInternal(ref allBoundsIntColumns, removeAt, 1);
 0291            DeleteRowsOfTypeInternal(ref allHash128Columns, removeAt, 1);
 0292            DeleteRowsOfTypeInternal(ref allGradientColumns, removeAt, 1);
 0293            DeleteRowsOfTypeInternal(ref allAnimationCurveColumns, removeAt, 1);
 0294            DeleteRowsOfTypeInternal(ref allObjectRefColumns, removeAt, 1);
 295
 0296            --rowCount;
 0297            dataVersion++;
 0298        }
 299
 300        public void RemoveRows(int removeAt, int numberOfRowsToDelete)
 0301        {
 0302            int newRowCount = rowCount - numberOfRowsToDelete;
 0303            for (int j = removeAt; j < rowCount - numberOfRowsToDelete; j++)
 0304            {
 0305                allRowNames[j] = allRowNames[j + numberOfRowsToDelete];
 0306            }
 307
 0308            Array.Resize(ref allRowNames, newRowCount);
 309
 0310            DeleteRowsOfTypeInternal(ref allStringColumns, removeAt, numberOfRowsToDelete);
 0311            DeleteRowsOfTypeInternal(ref allBoolColumns, removeAt, numberOfRowsToDelete);
 0312            DeleteRowsOfTypeInternal(ref allCharColumns, removeAt, numberOfRowsToDelete);
 0313            DeleteRowsOfTypeInternal(ref allSbyteColumns, removeAt, numberOfRowsToDelete);
 0314            DeleteRowsOfTypeInternal(ref allByteColumns, removeAt, numberOfRowsToDelete);
 0315            DeleteRowsOfTypeInternal(ref allShortColumns, removeAt, numberOfRowsToDelete);
 0316            DeleteRowsOfTypeInternal(ref allUshortColumns, removeAt, numberOfRowsToDelete);
 0317            DeleteRowsOfTypeInternal(ref allIntColumns, removeAt, numberOfRowsToDelete);
 0318            DeleteRowsOfTypeInternal(ref allUintColumns, removeAt, numberOfRowsToDelete);
 0319            DeleteRowsOfTypeInternal(ref allLongColumns, removeAt, numberOfRowsToDelete);
 0320            DeleteRowsOfTypeInternal(ref allUlongColumns, removeAt, numberOfRowsToDelete);
 0321            DeleteRowsOfTypeInternal(ref allFloatColumns, removeAt, numberOfRowsToDelete);
 0322            DeleteRowsOfTypeInternal(ref allDoubleColumns, removeAt, numberOfRowsToDelete);
 0323            DeleteRowsOfTypeInternal(ref allVector2Columns, removeAt, numberOfRowsToDelete);
 0324            DeleteRowsOfTypeInternal(ref allVector3Columns, removeAt, numberOfRowsToDelete);
 0325            DeleteRowsOfTypeInternal(ref allVector4Columns, removeAt, numberOfRowsToDelete);
 0326            DeleteRowsOfTypeInternal(ref allVector2IntColumns, removeAt, numberOfRowsToDelete);
 0327            DeleteRowsOfTypeInternal(ref allVector3IntColumns, removeAt, numberOfRowsToDelete);
 0328            DeleteRowsOfTypeInternal(ref allQuaternionColumns, removeAt, numberOfRowsToDelete);
 0329            DeleteRowsOfTypeInternal(ref allRectColumns, removeAt, numberOfRowsToDelete);
 0330            DeleteRowsOfTypeInternal(ref allRectIntColumns, removeAt, numberOfRowsToDelete);
 0331            DeleteRowsOfTypeInternal(ref allColorColumns, removeAt, numberOfRowsToDelete);
 0332            DeleteRowsOfTypeInternal(ref allLayerMaskColumns, removeAt, numberOfRowsToDelete);
 0333            DeleteRowsOfTypeInternal(ref allBoundsColumns, removeAt, numberOfRowsToDelete);
 0334            DeleteRowsOfTypeInternal(ref allBoundsIntColumns, removeAt, numberOfRowsToDelete);
 0335            DeleteRowsOfTypeInternal(ref allHash128Columns, removeAt, numberOfRowsToDelete);
 0336            DeleteRowsOfTypeInternal(ref allGradientColumns, removeAt, numberOfRowsToDelete);
 0337            DeleteRowsOfTypeInternal(ref allAnimationCurveColumns, removeAt, numberOfRowsToDelete);
 0338            DeleteRowsOfTypeInternal(ref allObjectRefColumns, removeAt, numberOfRowsToDelete);
 339
 0340            rowCount -= numberOfRowsToDelete;
 0341            dataVersion++;
 0342        }
 343
 344
 345        // TODO: Need to make sure that insertAt is the stableID, also this should return the stableID of the newly crea
 346        public int AddColumn(Serializable.SerializableTypes columnType, string columnName, int insertAt = -1)
 0347        {
 0348            switch (columnType)
 349            {
 350                case Serializable.SerializableTypes.String:
 0351                    return AddColumnInternal(columnName, ref allStringColumns, Serializable.SerializableTypes.String, in
 352                case Serializable.SerializableTypes.Char:
 0353                    return AddColumnInternal(columnName, ref allCharColumns, Serializable.SerializableTypes.Char, insert
 354                case Serializable.SerializableTypes.Bool:
 0355                    return AddColumnInternal(columnName, ref allBoolColumns, Serializable.SerializableTypes.Bool, insert
 356                case Serializable.SerializableTypes.SByte:
 0357                    return AddColumnInternal(columnName, ref allSbyteColumns, Serializable.SerializableTypes.SByte, inse
 358                case Serializable.SerializableTypes.Byte:
 0359                    return AddColumnInternal(columnName, ref allByteColumns, Serializable.SerializableTypes.Byte, insert
 360                case Serializable.SerializableTypes.Short:
 0361                    return AddColumnInternal(columnName, ref allShortColumns, Serializable.SerializableTypes.Short, inse
 362                case Serializable.SerializableTypes.UShort:
 0363                    return AddColumnInternal(columnName, ref allUshortColumns, Serializable.SerializableTypes.UShort, in
 364                case Serializable.SerializableTypes.Int:
 0365                    return AddColumnInternal(columnName, ref allIntColumns, Serializable.SerializableTypes.Int, insertAt
 366                case Serializable.SerializableTypes.UInt:
 0367                    return AddColumnInternal(columnName, ref allUintColumns, Serializable.SerializableTypes.UInt, insert
 368                case Serializable.SerializableTypes.Long:
 0369                    return AddColumnInternal(columnName, ref allLongColumns, Serializable.SerializableTypes.Long, insert
 370                case Serializable.SerializableTypes.ULong:
 0371                    return AddColumnInternal(columnName, ref allUlongColumns, Serializable.SerializableTypes.ULong, inse
 372                case Serializable.SerializableTypes.Float:
 0373                    return AddColumnInternal(columnName, ref allFloatColumns, Serializable.SerializableTypes.Float, inse
 374                case Serializable.SerializableTypes.Double:
 0375                    return AddColumnInternal(columnName, ref allDoubleColumns, Serializable.SerializableTypes.Double, in
 376                case Serializable.SerializableTypes.Vector2:
 0377                    return AddColumnInternal(columnName, ref allVector2Columns, Serializable.SerializableTypes.Vector2, 
 378                case Serializable.SerializableTypes.Vector3:
 0379                    return AddColumnInternal(columnName, ref allVector3Columns, Serializable.SerializableTypes.Vector3, 
 380                case Serializable.SerializableTypes.Vector4:
 0381                    return AddColumnInternal(columnName, ref allVector4Columns, Serializable.SerializableTypes.Vector4, 
 382                case Serializable.SerializableTypes.Vector2Int:
 0383                    return AddColumnInternal(columnName, ref allVector2IntColumns, Serializable.SerializableTypes.Vector
 384                case Serializable.SerializableTypes.Vector3Int:
 0385                    return AddColumnInternal(columnName, ref allVector3IntColumns, Serializable.SerializableTypes.Vector
 386                case Serializable.SerializableTypes.Quaternion:
 0387                    return AddColumnInternal(columnName, ref allQuaternionColumns, Serializable.SerializableTypes.Quater
 388                case Serializable.SerializableTypes.Rect:
 0389                    return AddColumnInternal(columnName, ref allRectColumns, Serializable.SerializableTypes.Rect, insert
 390                case Serializable.SerializableTypes.RectInt:
 0391                    return AddColumnInternal(columnName, ref allRectIntColumns, Serializable.SerializableTypes.RectInt, 
 392                case Serializable.SerializableTypes.Color:
 0393                    return AddColumnInternal(columnName, ref allColorColumns, Serializable.SerializableTypes.Color, inse
 394                case Serializable.SerializableTypes.LayerMask:
 0395                    return AddColumnInternal(columnName, ref allLayerMaskColumns, Serializable.SerializableTypes.LayerMa
 396                case Serializable.SerializableTypes.Bounds:
 0397                    return AddColumnInternal(columnName, ref allBoundsColumns, Serializable.SerializableTypes.Bounds, in
 398                case Serializable.SerializableTypes.BoundsInt:
 0399                    return AddColumnInternal(columnName, ref allBoundsIntColumns, Serializable.SerializableTypes.BoundsI
 400                case Serializable.SerializableTypes.Hash128:
 0401                    return AddColumnInternal(columnName, ref allHash128Columns, Serializable.SerializableTypes.Hash128, 
 402                case Serializable.SerializableTypes.Gradient:
 0403                    return AddColumnInternal(columnName, ref allGradientColumns, Serializable.SerializableTypes.Gradient
 404                case Serializable.SerializableTypes.AnimationCurve:
 0405                    return AddColumnInternal(columnName, ref allAnimationCurveColumns, Serializable.SerializableTypes.An
 406                case Serializable.SerializableTypes.Object:
 0407                    return AddColumnInternal(columnName, ref allObjectRefColumns, Serializable.SerializableTypes.Object,
 408            }
 0409            return -1;
 0410        }
 411
 412        // TODO: need to make sure this is the stable ID?
 413        public void RemoveColumn(Serializable.SerializableTypes columnType, int removeAt = -1)
 0414        {
 0415            switch (columnType)
 416            {
 417                case Serializable.SerializableTypes.String:
 0418                    RemoveColumnInternal(ref allStringColumns, Serializable.SerializableTypes.String, removeAt);
 0419                    break;
 420                case Serializable.SerializableTypes.Char:
 0421                    RemoveColumnInternal(ref allCharColumns, Serializable.SerializableTypes.Char, removeAt);
 0422                    break;
 423                case Serializable.SerializableTypes.Bool:
 0424                    RemoveColumnInternal(ref allBoolColumns, Serializable.SerializableTypes.Bool, removeAt);
 0425                    break;
 426                case Serializable.SerializableTypes.SByte:
 0427                    RemoveColumnInternal(ref allSbyteColumns, Serializable.SerializableTypes.SByte, removeAt);
 0428                    break;
 429                case Serializable.SerializableTypes.Byte:
 0430                    RemoveColumnInternal(ref allByteColumns, Serializable.SerializableTypes.Byte, removeAt);
 0431                    break;
 432                case Serializable.SerializableTypes.Short:
 0433                    RemoveColumnInternal(ref allShortColumns, Serializable.SerializableTypes.Short, removeAt);
 0434                    break;
 435                case Serializable.SerializableTypes.UShort:
 0436                    RemoveColumnInternal(ref allUshortColumns, Serializable.SerializableTypes.UShort, removeAt);
 0437                    break;
 438                case Serializable.SerializableTypes.Int:
 0439                    RemoveColumnInternal(ref allIntColumns, Serializable.SerializableTypes.Int, removeAt);
 0440                    break;
 441                case Serializable.SerializableTypes.UInt:
 0442                    RemoveColumnInternal(ref allUintColumns, Serializable.SerializableTypes.UInt, removeAt);
 0443                    break;
 444                case Serializable.SerializableTypes.Long:
 0445                    RemoveColumnInternal(ref allLongColumns, Serializable.SerializableTypes.Long, removeAt);
 0446                    break;
 447                case Serializable.SerializableTypes.ULong:
 0448                    RemoveColumnInternal(ref allUlongColumns, Serializable.SerializableTypes.ULong, removeAt);
 0449                    break;
 450                case Serializable.SerializableTypes.Float:
 0451                    RemoveColumnInternal(ref allFloatColumns, Serializable.SerializableTypes.Float, removeAt);
 0452                    break;
 453                case Serializable.SerializableTypes.Double:
 0454                    RemoveColumnInternal(ref allDoubleColumns, Serializable.SerializableTypes.Double, removeAt);
 0455                    break;
 456                case Serializable.SerializableTypes.Vector2:
 0457                    RemoveColumnInternal(ref allVector2Columns, Serializable.SerializableTypes.Vector2, removeAt);
 0458                    break;
 459                case Serializable.SerializableTypes.Vector3:
 0460                    RemoveColumnInternal(ref allVector3Columns, Serializable.SerializableTypes.Vector3, removeAt);
 0461                    break;
 462                case Serializable.SerializableTypes.Vector4:
 0463                    RemoveColumnInternal(ref allVector4Columns, Serializable.SerializableTypes.Vector4, removeAt);
 0464                    break;
 465                case Serializable.SerializableTypes.Vector2Int:
 0466                    RemoveColumnInternal(ref allVector2IntColumns, Serializable.SerializableTypes.Vector2Int, removeAt);
 0467                    break;
 468                case Serializable.SerializableTypes.Vector3Int:
 0469                    RemoveColumnInternal(ref allVector3IntColumns, Serializable.SerializableTypes.Vector3Int, removeAt);
 0470                    break;
 471                case Serializable.SerializableTypes.Quaternion:
 0472                    RemoveColumnInternal(ref allQuaternionColumns, Serializable.SerializableTypes.Quaternion, removeAt);
 0473                    break;
 474                case Serializable.SerializableTypes.Rect:
 0475                    RemoveColumnInternal(ref allRectColumns, Serializable.SerializableTypes.Rect, removeAt);
 0476                    break;
 477                case Serializable.SerializableTypes.RectInt:
 0478                    RemoveColumnInternal(ref allRectIntColumns, Serializable.SerializableTypes.RectInt, removeAt);
 0479                    break;
 480                case Serializable.SerializableTypes.Color:
 0481                    RemoveColumnInternal(ref allColorColumns, Serializable.SerializableTypes.Color, removeAt);
 0482                    break;
 483                case Serializable.SerializableTypes.LayerMask:
 0484                    RemoveColumnInternal(ref allLayerMaskColumns, Serializable.SerializableTypes.LayerMask, removeAt);
 0485                    break;
 486                case Serializable.SerializableTypes.Bounds:
 0487                    RemoveColumnInternal(ref allBoundsColumns, Serializable.SerializableTypes.Bounds, removeAt);
 0488                    break;
 489                case Serializable.SerializableTypes.BoundsInt:
 0490                    RemoveColumnInternal(ref allBoundsIntColumns, Serializable.SerializableTypes.BoundsInt, removeAt);
 0491                    break;
 492                case Serializable.SerializableTypes.Hash128:
 0493                    RemoveColumnInternal(ref allHash128Columns, Serializable.SerializableTypes.Hash128, removeAt);
 0494                    break;
 495                case Serializable.SerializableTypes.Gradient:
 0496                    RemoveColumnInternal(ref allGradientColumns, Serializable.SerializableTypes.Gradient, removeAt);
 0497                    break;
 498                case Serializable.SerializableTypes.AnimationCurve:
 0499                    RemoveColumnInternal(ref allAnimationCurveColumns, Serializable.SerializableTypes.AnimationCurve, re
 0500                    break;
 501                case Serializable.SerializableTypes.Object:
 0502                    RemoveColumnInternal(ref allObjectRefColumns, Serializable.SerializableTypes.Object, removeAt);
 0503                    break;
 504            }
 0505        }
 506
 507
 508
 509
 510        // Set
 511
 512        public ulong SetString(int row, int column, string value)
 0513        {
 0514            return SetCell(row, column, ref allStringColumns, value);
 0515        }
 516
 517        public ulong SetBool(int row, int column, bool value)
 0518        {
 0519            return SetCell(row, column, ref allBoolColumns, value);
 0520        }
 521
 522        public ulong SetChar(int row, int column, char value)
 0523        {
 0524            return SetCell(row, column, ref allCharColumns, value);
 0525        }
 526
 527        public ulong SetSByte(int row, int column, sbyte value)
 0528        {
 0529            return SetCell(row, column, ref allSbyteColumns, value);
 0530        }
 531
 532        public ulong SetByte(int row, int column, byte value)
 0533        {
 0534            return SetCell(row, column, ref allByteColumns, value);
 0535        }
 536
 537        public ulong SetShort(int row, int column, short value)
 0538        {
 0539            return SetCell(row, column, ref allShortColumns, value);
 0540        }
 541
 542        public ulong SetUShort(int row, int column, ushort value)
 0543        {
 0544            return SetCell(row, column, ref allUshortColumns, value);
 0545        }
 546
 547        public ulong SetInt(int row, int column, int value)
 0548        {
 0549            return SetCell(row, column, ref allIntColumns, value);
 0550        }
 551
 552        public ulong SetUInt(int row, int column, uint value)
 0553        {
 0554            return SetCell(row, column, ref allUintColumns, value);
 0555        }
 556
 557        public ulong SetLong(int row, int column, long value)
 0558        {
 0559            return SetCell(row, column, ref allLongColumns, value);
 0560        }
 561
 562        public ulong SetULong(int row, int column, ulong value)
 0563        {
 0564            return SetCell(row, column, ref allUlongColumns, value);
 0565        }
 566
 567        public ulong SetFloat(int row, int column, float value)
 0568        {
 0569            return SetCell(row, column, ref allFloatColumns, value);
 0570        }
 571
 572        public ulong SetDouble(int row, int column, double value)
 0573        {
 0574            return SetCell(row, column, ref allDoubleColumns, value);
 0575        }
 576
 577        public ulong SetVector2(int row, int column, Vector2 value)
 0578        {
 0579            return SetCell(row, column, ref allVector2Columns, value);
 0580        }
 581
 582        public ulong SetVector3(int row, int column, Vector3 value)
 0583        {
 0584            return SetCell(row, column, ref allVector3Columns, value);
 0585        }
 586
 587        public ulong SetVector4(int row, int column, Vector4 value)
 0588        {
 0589            return SetCell(row, column, ref allVector4Columns, value);
 0590        }
 591
 592        public ulong SetVector2Int(int row, int column, Vector2Int value)
 0593        {
 0594            return SetCell(row, column, ref allVector2IntColumns, value);
 0595        }
 596
 597        public ulong SetVector3Int(int row, int column, Vector3Int value)
 0598        {
 0599            return SetCell(row, column, ref allVector3IntColumns, value);
 0600        }
 601
 602        public ulong SetQuaternion(int row, int column, Quaternion value)
 0603        {
 0604            return SetCell(row, column, ref allQuaternionColumns, value);
 0605        }
 606
 607        public ulong SetRect(int row, int column, Rect value)
 0608        {
 0609            return SetCell(row, column, ref allRectColumns, value);
 0610        }
 611
 612        public ulong SetRectInt(int row, int column, RectInt value)
 0613        {
 0614            return SetCell(row, column, ref allRectIntColumns, value);
 0615        }
 616
 617        public ulong SetColor(int row, int column, Color value)
 0618        {
 0619            return SetCell(row, column, ref allColorColumns, value);
 0620        }
 621
 622        public ulong SetLayerMask(int row, int column, LayerMask value)
 0623        {
 0624            return SetCell(row, column, ref allLayerMaskColumns, value);
 0625        }
 626
 627        public ulong SetBounds(int row, int column, Bounds value)
 0628        {
 0629            return SetCell(row, column, ref allBoundsColumns, value);
 0630        }
 631
 632        public ulong SetBoundsInt(int row, int column, BoundsInt value)
 0633        {
 0634            return SetCell(row, column, ref allBoundsIntColumns, value);
 0635        }
 636
 637        public ulong SetHash128(int row, int column, Hash128 value)
 0638        {
 0639            return SetCell(row, column, ref allHash128Columns, value);
 0640        }
 641
 642        public ulong SetGradient(int row, int column, Gradient value)
 0643        {
 0644            return SetCell(row, column, ref allGradientColumns, value);
 0645        }
 646
 647        public ulong SetAnimationCurve(int row, int column, AnimationCurve value)
 0648        {
 0649            return SetCell(row, column, ref allAnimationCurveColumns, value);
 0650        }
 651
 652        public ulong SetObject(int row, int column, UnityEngine.Object value)
 0653        {
 0654            return SetCell(row, column, ref allObjectRefColumns, value);
 0655        }
 656
 657        // Get
 658        public string GetString(int row, int column)
 0659        {
 0660            return GetCell(row, column, ref allStringColumns);
 0661        }
 662
 663        public bool GetBool(int row, int column)
 0664        {
 0665            return GetCell(row, column, ref allBoolColumns);
 0666        }
 667
 668        public char GetChar(int row, int column)
 0669        {
 0670            return GetCell(row, column, ref allCharColumns);
 0671        }
 672
 673        public sbyte GetSByte(int row, int column)
 0674        {
 0675            return GetCell(row, column, ref allSbyteColumns);
 0676        }
 677
 678        public byte GetByte(int row, int column)
 0679        {
 0680            return GetCell(row, column, ref allByteColumns);
 0681        }
 682
 683        public short GetShort(int row, int column)
 0684        {
 0685            return GetCell(row, column, ref allShortColumns);
 0686        }
 687
 688        public ushort GetUShort(int row, int column)
 0689        {
 0690            return GetCell(row, column, ref allUshortColumns);
 0691        }
 692
 693        public int GetInt(int row, int column)
 0694        {
 0695            return GetCell(row, column, ref allIntColumns);
 0696        }
 697
 698        public uint GetUInt(int row, int column)
 0699        {
 0700            return GetCell(row, column, ref allUintColumns);
 0701        }
 702
 703        public long GetLong(int row, int column)
 0704        {
 0705            return GetCell(row, column, ref allLongColumns);
 0706        }
 707
 708        public ulong GetULong(int row, int column)
 0709        {
 0710            return GetCell(row, column, ref allUlongColumns);
 0711        }
 712
 713        public float GetFloat(int row, int column)
 0714        {
 0715            return GetCell(row, column, ref allFloatColumns);
 0716        }
 717
 718        public double GetDouble(int row, int column)
 0719        {
 0720            return GetCell(row, column, ref allDoubleColumns);
 0721        }
 722
 723        public Vector2 GetVector2(int row, int column)
 0724        {
 0725            return GetCell(row, column, ref allVector2Columns);
 0726        }
 727
 728        public Vector3 GetVector3(int row, int column)
 0729        {
 0730            return GetCell(row, column, ref allVector3Columns);
 0731        }
 732
 733        public Vector4 GetVector4(int row, int column)
 0734        {
 0735            return GetCell(row, column, ref allVector4Columns);
 0736        }
 737
 738        public Vector2Int GetVector2Int(int row, int column)
 0739        {
 0740            return GetCell(row, column, ref allVector2IntColumns);
 0741        }
 742
 743        public Vector3Int GetVector3Int(int row, int column)
 0744        {
 0745            return GetCell(row, column, ref allVector3IntColumns);
 0746        }
 747
 748        public Quaternion GetQuaternion(int row, int column)
 0749        {
 0750            return GetCell(row, column, ref allQuaternionColumns);
 0751        }
 752
 753        public Rect GetRect(int row, int column)
 0754        {
 0755            return GetCell(row, column, ref allRectColumns);
 0756        }
 757
 758        public RectInt GetRectInt(int row, int column)
 0759        {
 0760            return GetCell(row, column, ref allRectIntColumns);
 0761        }
 762
 763        public Color GetColor(int row, int column)
 0764        {
 0765            return GetCell(row, column, ref allColorColumns);
 0766        }
 767
 768        public LayerMask GetLayerMask(int row, int column)
 0769        {
 0770            return GetCell(row, column, ref allLayerMaskColumns);
 0771        }
 772
 773        public Bounds GetBounds(int row, int column)
 0774        {
 0775            return GetCell(row, column, ref allBoundsColumns);
 0776        }
 777
 778        public BoundsInt GetBoundsInt(int row, int column)
 0779        {
 0780            return GetCell(row, column, ref allBoundsIntColumns);
 0781        }
 782
 783        public Hash128 GetHash128(int row, int column)
 0784        {
 0785            return GetCell(row, column, ref allHash128Columns);
 0786        }
 787
 788        public Gradient GetGradient(int row, int column)
 0789        {
 0790            return GetCell(row, column, ref allGradientColumns);
 0791        }
 792
 793        public AnimationCurve GetAnimationCurve(int row, int column)
 0794        {
 0795            return GetCell(row, column, ref allAnimationCurveColumns);
 0796        }
 797
 798        public UnityEngine.Object GetObject(int row, int column)
 0799        {
 0800            return GetCell(row, column, ref allObjectRefColumns);
 0801        }
 802
 803        // Get ref
 804
 805        public ref string GetStringRef(int row, int column)
 0806        {
 0807            return ref GetCellRef(row, column, ref allStringColumns);
 0808        }
 809
 810        public ref bool GetBoolRef(int row, int column)
 0811        {
 0812            return ref GetCellRef(row, column, ref allBoolColumns);
 0813        }
 814
 815        public ref char GetCharRef(int row, int column)
 0816        {
 0817            return ref GetCellRef(row, column, ref allCharColumns);
 0818        }
 819
 820        public ref sbyte GetSbyteRef(int row, int column)
 0821        {
 0822            return ref GetCellRef(row, column, ref allSbyteColumns);
 0823        }
 824
 825        public ref byte GetByteRef(int row, int columnID)
 0826        {
 0827            return ref GetCellRef(row, columnID, ref allByteColumns);
 0828        }
 829
 830        public ref short GetShortRef(int row, int column)
 0831        {
 0832            return ref GetCellRef(row, column, ref allShortColumns);
 0833        }
 834
 835        public ref ushort GetUshortRef(int row, int column)
 0836        {
 0837            return ref GetCellRef(row, column, ref allUshortColumns);
 0838        }
 839
 840        public ref int GetIntRef(int row, int column)
 0841        {
 0842            return ref GetCellRef(row, column, ref allIntColumns);
 0843        }
 844
 845        public ref uint GetUintRef(int row, int column)
 0846        {
 0847            return ref GetCellRef(row, column, ref allUintColumns);
 0848        }
 849
 850        public ref long GetLongRef(int row, int column)
 0851        {
 0852            return ref GetCellRef(row, column, ref allLongColumns);
 0853        }
 854
 855        public ref ulong GetUlongRef(int row, int column)
 0856        {
 0857            return ref GetCellRef(row, column, ref allUlongColumns);
 0858        }
 859
 860        public ref float GetFloatRef(int row, int column)
 0861        {
 0862            return ref GetCellRef(row, column, ref allFloatColumns);
 0863        }
 864
 865        public ref double GetDoubleRef(int row, int column)
 0866        {
 0867            return ref GetCellRef(row, column, ref allDoubleColumns);
 0868        }
 869
 870        public ref Vector2 GetVector2Ref(int row, int column)
 0871        {
 0872            return ref GetCellRef(row, column, ref allVector2Columns);
 0873        }
 874
 875        public ref Vector3 GetVector3Ref(int row, int column)
 0876        {
 0877            return ref GetCellRef(row, column, ref allVector3Columns);
 0878        }
 879
 880        public ref Vector4 GetVector4Ref(int row, int column)
 0881        {
 0882            return ref GetCellRef(row, column, ref allVector4Columns);
 0883        }
 884
 885        public ref Vector2Int GetVector2IntRef(int row, int column)
 0886        {
 0887            return ref GetCellRef(row, column, ref allVector2IntColumns);
 0888        }
 889
 890        public ref Vector3Int GetVector3IntRef(int row, int column)
 0891        {
 0892            return ref GetCellRef(row, column, ref allVector3IntColumns);
 0893        }
 894
 895        public ref Quaternion GetQuaternionRef(int row, int column)
 0896        {
 0897            return ref GetCellRef(row, column, ref allQuaternionColumns);
 0898        }
 899
 900        public ref Rect GetRectRef(int row, int column)
 0901        {
 0902            return ref GetCellRef(row, column, ref allRectColumns);
 0903        }
 904
 905        public ref RectInt GetRectIntRef(int row, int column)
 0906        {
 0907            return ref GetCellRef(row, column, ref allRectIntColumns);
 0908        }
 909
 910        public ref Color GetColorRef(int row, int column)
 0911        {
 0912            return ref GetCellRef(row, column, ref allColorColumns);
 0913        }
 914
 915        public ref LayerMask GetLayerMaskRef(int row, int column)
 0916        {
 0917            return ref GetCellRef(row, column, ref allLayerMaskColumns);
 0918        }
 919
 920        public ref Bounds GetBoundsRef(int row, int column)
 0921        {
 0922            return ref GetCellRef(row, column, ref allBoundsColumns);
 0923        }
 924
 925        public ref BoundsInt GetBoundsIntRef(int row, int column)
 0926        {
 0927            return ref GetCellRef(row, column, ref allBoundsIntColumns);
 0928        }
 929
 930        public ref Hash128 GetHash128Ref(int row, int column)
 0931        {
 0932            return ref GetCellRef(row, column, ref allHash128Columns);
 0933        }
 934
 935        public ref Gradient GetGradientRef(int row, int column)
 0936        {
 0937            return ref GetCellRef(row, column, ref allGradientColumns);
 0938        }
 939
 940        public ref AnimationCurve GetAnimationCurveRef(int row, int column)
 0941        {
 0942            return ref GetCellRef(row, column, ref allAnimationCurveColumns);
 0943        }
 944
 945        public ref UnityEngine.Object GetObjectRef(int row, int column)
 0946        {
 0947            return ref GetCellRef(row, column, ref allObjectRefColumns);
 0948        }
 949
 950        // Get Column
 951
 952        public string[] GetStringColumn(int column)
 0953        {
 0954            return GetColumn(column, ref allStringColumns);
 0955        }
 956
 957        public bool[] GetBoolColumn(int column)
 0958        {
 0959            return GetColumn(column, ref allBoolColumns);
 0960        }
 961
 962        public char[] GetCharColumn(int column)
 0963        {
 0964            return GetColumn(column, ref allCharColumns);
 0965        }
 966
 967        public sbyte[] GetSbyteColumn(int column)
 0968        {
 0969            return GetColumn(column, ref allSbyteColumns);
 0970        }
 971
 972        public byte[] GetByteColumn(int column)
 0973        {
 0974            return GetColumn(column, ref allByteColumns);
 0975        }
 976
 977        public short[] GetShortColumn(int column)
 0978        {
 0979            return GetColumn(column, ref allShortColumns);
 0980        }
 981
 982        public ushort[] GetUshortColumn(int column)
 0983        {
 0984            return GetColumn(column, ref allUshortColumns);
 0985        }
 986
 987        public int[] GetIntColumn(int column)
 0988        {
 0989            return GetColumn(column, ref allIntColumns);
 0990        }
 991
 992        public uint[] GetUintColumn(int column)
 0993        {
 0994            return GetColumn(column, ref allUintColumns);
 0995        }
 996
 997        public long[] GetLongColumn(int column)
 0998        {
 0999            return GetColumn(column, ref allLongColumns);
 01000        }
 1001
 1002        public ulong[] GetUlongColumn(int column)
 01003        {
 01004            return GetColumn(column, ref allUlongColumns);
 01005        }
 1006
 1007        public float[] GetFloatColumn(int column)
 01008        {
 01009            return GetColumn(column, ref allFloatColumns);
 01010        }
 1011
 1012        public double[] GetDoubleColumn(int column)
 01013        {
 01014            return GetColumn(column, ref allDoubleColumns);
 01015        }
 1016
 1017        public Vector2[] GetVector2Column(int column)
 01018        {
 01019            return GetColumn(column, ref allVector2Columns);
 01020        }
 1021
 1022        public Vector3[] GetVector3Column(int column)
 01023        {
 01024            return GetColumn(column, ref allVector3Columns);
 01025        }
 1026
 1027        public Vector4[] GetVector4Column(int column)
 01028        {
 01029            return GetColumn(column, ref allVector4Columns);
 01030        }
 1031
 1032        public Vector2Int[] GetVector2IntColumn(int column)
 01033        {
 01034            return GetColumn(column, ref allVector2IntColumns);
 01035        }
 1036
 1037        public Vector3Int[] GetVector3IntColumn(int column)
 01038        {
 01039            return GetColumn(column, ref allVector3IntColumns);
 01040        }
 1041
 1042        public Quaternion[] GetQuaternionColumn(int column)
 01043        {
 01044            return GetColumn(column, ref allQuaternionColumns);
 01045        }
 1046
 1047        public Rect[] GetRectColumn(int column)
 01048        {
 01049            return GetColumn(column, ref allRectColumns);
 01050        }
 1051
 1052        public RectInt[] GetRectIntColumn(int column)
 01053        {
 01054            return GetColumn(column, ref allRectIntColumns);
 01055        }
 1056
 1057        public Color[] GetColorColumn(int column)
 01058        {
 01059            return GetColumn(column, ref allColorColumns);
 01060        }
 1061
 1062        public LayerMask[] GetLayerMaskColumn(int column)
 01063        {
 01064            return GetColumn(column, ref allLayerMaskColumns);
 01065        }
 1066
 1067        public Bounds[] GetBoundsColumn(int column)
 01068        {
 01069            return GetColumn(column, ref allBoundsColumns);
 01070        }
 1071
 1072        public BoundsInt[] GetBoundsIntColumn(int column)
 01073        {
 01074            return GetColumn(column, ref allBoundsIntColumns);
 01075        }
 1076
 1077        public Hash128[] GetHash128Column(int column)
 01078        {
 01079            return GetColumn(column, ref allHash128Columns);
 01080        }
 1081
 1082        public Gradient[] GetGradientColumn(int column)
 01083        {
 01084            return GetColumn(column, ref allGradientColumns);
 01085        }
 1086
 1087        public AnimationCurve[] GetAnimationCurveColumn(int column)
 01088        {
 01089            return GetColumn(column, ref allAnimationCurveColumns);
 01090        }
 1091
 1092        public UnityEngine.Object[] GetObjectColumn(int column)
 01093        {
 01094            return GetColumn(column, ref allObjectRefColumns);
 01095        }
 1096
 1097        // Internal
 1098
 1099        internal int AddColumnInternal<T>(string columnName, ref ArrayHolder<T>[] allColumnsOfType, Serializable.Seriali
 01100        {
 01101            int columnCount = allColumnsOfType?.Length ?? 0;
 01102            Array.Resize(ref allColumnsOfType, columnCount + 1);
 01103            allColumnsOfType[columnCount].TArray = new T[rowCount];
 1104
 01105            string[] columnNamesForType = allColumnNames[(int)typeIndex].TArray;
 01106            int columnNamesCount = columnNamesForType?.Length ?? 0;
 01107            Array.Resize(ref columnNamesForType, columnNamesCount + 1);
 01108            columnNamesForType[columnNamesCount] = columnName;
 01109            allColumnNames[(int)typeIndex].TArray = columnNamesForType;
 1110
 01111            int columnIndex = columnEntriesFreeListHead;
 01112            int columnIDToDenseIndexMapLength = columnIDToDenseIndexMap?.Length ?? 0;
 01113            if (columnIndex >= columnIDToDenseIndexMapLength)
 01114            {
 01115                int newSize = columnIndex * 2;
 01116                newSize = newSize == 0 ? 1 : newSize;
 01117                Array.Resize(ref columnIDToDenseIndexMap, newSize);
 01118                for (int i = 0; i < columnIndex; i++)
 01119                {
 01120                    ref ColumnEntry entry = ref columnIDToDenseIndexMap[columnIndex + i];
 01121                    entry.columnDenseIndex = columnIndex + i + 1;
 01122                    entry.ColumnType = Serializable.SerializableTypes.Invalid;
 01123                }
 01124            }
 1125
 01126            ref int[] denseIndexToIDMap = ref columnDenseIndexToIDMap[(int)typeIndex].TArray;
 01127            int denseIndexToIDMapLength = denseIndexToIDMap?.Length ?? 0;
 01128            Array.Resize(ref denseIndexToIDMap, denseIndexToIDMapLength + 1);
 01129            denseIndexToIDMap[denseIndexToIDMapLength] = columnIndex;
 1130
 01131            ref ColumnEntry newEntry = ref columnIDToDenseIndexMap[columnIndex];
 01132            newEntry.columnDenseIndex = denseIndexToIDMapLength;
 01133            newEntry.ColumnType = typeIndex;
 1134
 01135            insertAt = insertAt < 0 ? combinedColumnCount : insertAt;
 01136            ref int[] columnOrdersOfType = ref allColumnOrders[(int)typeIndex].TArray;
 01137            int columnOrdersOfTypeLength = columnOrdersOfType?.Length ?? 0;
 01138            Array.Resize(ref columnOrdersOfType, columnOrdersOfTypeLength + 1);
 01139            columnOrdersOfType[columnOrdersOfTypeLength] = insertAt;
 1140
 01141            for (int i = 0; i < Serializable.SerializableTypesCount; i++)
 01142            {
 01143                int[] columnOrdersOfTypeCurrent = allColumnOrders[i].TArray;
 01144                int columnOrdersLength = columnOrdersOfTypeCurrent?.Length ?? 0;
 01145                for (int j = 0; j < columnOrdersLength; j++)
 01146                {
 01147                    int columnOrderCurrent = columnOrdersOfTypeCurrent[j];
 1148
 01149                    if (columnOrderCurrent > insertAt)
 01150                    {
 01151                        columnOrdersOfType[j] = columnOrderCurrent + 1;
 01152                    }
 01153                }
 01154            }
 1155
 01156            ++combinedColumnCount;
 01157            dataVersion++;
 1158
 01159            return columnIndex;
 01160        }
 1161
 1162        internal void RemoveColumnInternal<T>(ref ArrayHolder<T>[] allColumnsOfType, Serializable.SerializableTypes type
 01163        {
 01164            int columnLocation = columnIDToDenseIndexMap[column].columnDenseIndex;
 1165
 01166            int lastIndex = allColumnsOfType.Length - 1;
 01167            allColumnsOfType[columnLocation] = allColumnsOfType[lastIndex];
 1168           // T[][] newColumnArray = new T[lastIndex][];
 01169            ArrayHolder<T>[] newColumnArray = new ArrayHolder<T>[lastIndex];
 01170            Array.Copy(allColumnsOfType, 0, newColumnArray, 0, lastIndex);
 01171            allColumnsOfType = newColumnArray;
 1172
 01173            string[] columnNamesOfType = allColumnNames[(int)typeIndex].TArray;
 01174            columnNamesOfType[columnLocation] = columnNamesOfType[lastIndex];
 01175            string[] newColumnNamesOfType = new string[lastIndex];
 01176            Array.Copy(columnNamesOfType, 0, newColumnNamesOfType, 0, lastIndex);
 01177            allColumnNames[(int)typeIndex].TArray = newColumnNamesOfType;
 1178
 01179            int[] columnOrdersOfType = allColumnOrders[(int)typeIndex].TArray;
 01180            int columnOrder = columnOrdersOfType[columnLocation];
 01181            columnOrdersOfType[columnLocation] = columnOrdersOfType[lastIndex];
 01182            int[] newColumnOrdersOfType = new int[lastIndex];
 01183            Array.Copy(columnOrdersOfType, 0, newColumnOrdersOfType, 0, lastIndex);
 01184            allColumnOrders[(int)typeIndex].TArray = newColumnOrdersOfType;
 1185
 01186            int[] denseIndicesOfType = columnDenseIndexToIDMap[(int)typeIndex].TArray;
 01187            int sparseIndexAt = denseIndicesOfType[columnLocation];
 01188            int sparseIndexToSwap = columnOrdersOfType[lastIndex];
 01189            ref ColumnEntry sparseIndexToFree = ref columnIDToDenseIndexMap[sparseIndexAt];
 01190            sparseIndexToFree.ColumnType = Serializable.SerializableTypes.Invalid;
 01191            sparseIndexToFree.columnDenseIndex = columnEntriesFreeListHead;
 01192            columnEntriesFreeListHead = sparseIndexAt;
 01193            columnIDToDenseIndexMap[sparseIndexToSwap].columnDenseIndex = columnLocation;
 01194            denseIndicesOfType[columnLocation] = sparseIndexToSwap;
 01195            int[] newDenseIndicesOfType = new int[lastIndex];
 01196            Array.Copy(denseIndicesOfType, 0, newDenseIndicesOfType, 0, lastIndex);
 01197            columnDenseIndexToIDMap[(int)typeIndex].TArray = newDenseIndicesOfType;
 1198
 01199            for (int i = 0; i < Serializable.SerializableTypesCount; i++)
 01200            {
 01201                int[] columnOrdersOfTypeCurrent = allColumnOrders[i].TArray;
 1202
 01203                int columnOrdersLength = columnOrdersOfTypeCurrent.Length;
 01204                for (int j = 0; j < columnOrdersLength; j++)
 01205                {
 01206                    int columnOrderCurrent = columnOrdersOfTypeCurrent[j];
 1207
 01208                    if (columnOrderCurrent > columnOrder)
 01209                    {
 01210                        columnOrdersOfType[j] = columnOrderCurrent - 1;
 01211                    }
 01212                }
 01213            }
 1214
 01215            --combinedColumnCount;
 01216            dataVersion++;
 01217        }
 1218
 1219        internal void InsertRowsOfTypeInternal<T>(ref ArrayHolder<T>[] allColumnsOfType, int insertAt, int numberOfNewRo
 01220        {
 01221            int columnCount = allColumnsOfType?.Length ?? 0;
 01222            for (int i = 0; i < columnCount; i++)
 01223            {
 01224                ref T[] column = ref allColumnsOfType[i].TArray;
 01225                int newRowCount = rowCount + numberOfNewRows;
 01226                Array.Resize(ref column, newRowCount);
 01227                for (int j = newRowCount - 1; j > insertAt + numberOfNewRows - 1; j--)
 01228                {
 01229                    column[j] = column[j - numberOfNewRows];
 01230                }
 1231
 01232                for (int j = 0; j < numberOfNewRows; j++)
 01233                {
 01234                    column[insertAt + j] = default;
 01235                }
 01236            }
 01237        }
 1238
 1239        internal void DeleteRowsOfTypeInternal<T>(ref ArrayHolder<T>[] allColumnsOfType, int removeAt, int numberOfRowsT
 01240        {
 01241            int columnCount = allColumnsOfType?.Length ?? 0;
 1242
 01243            for (int i = 0; i < columnCount; i++)
 01244            {
 01245                ref T[] column = ref allColumnsOfType[i].TArray;
 01246                int newRowCount = rowCount - numberOfRowsToDelete;
 1247
 01248                for (int j = removeAt; j < rowCount - numberOfRowsToDelete; j++)
 01249                {
 01250                    column[j] = column[j + numberOfRowsToDelete];
 01251                }
 1252
 01253                Array.Resize(ref column, newRowCount);
 01254            }
 01255        }
 1256
 1257        internal ref T GetCellRef<T>(int rowID, int columnID, ref ArrayHolder<T>[] allColumnsOfType)
 01258        {
 01259            int column = columnIDToDenseIndexMap[columnID].columnDenseIndex;
 01260            return ref allColumnsOfType[column][rowID];
 01261        }
 1262
 1263        internal T GetCell<T>(int rowID, int columnID, ref ArrayHolder<T>[] allColumnsOfType)
 01264        {
 01265            int column = columnIDToDenseIndexMap[columnID].columnDenseIndex;
 01266            return allColumnsOfType[column][rowID];
 01267        }
 1268
 1269        internal ulong SetCell<T>(int rowID, int columnID, ref ArrayHolder<T>[] allColumnsOfType, T value)
 01270        {
 01271            int column = columnIDToDenseIndexMap[columnID].columnDenseIndex;
 01272            allColumnsOfType[column][rowID] = value;
 01273            dataVersion++;
 01274            return dataVersion;
 01275        }
 1276
 1277        internal T[] GetColumn<T>(int columnID, ref ArrayHolder<T>[] allColumnsOfType)
 01278        {
 01279            int column = columnIDToDenseIndexMap[columnID].columnDenseIndex;
 01280            return allColumnsOfType[column].TArray;
 01281        }
 1282    }
 1283}

Coverage by test methods





































































































































































































































































































































































































































































































































































































































































































Methods/Properties

StableTable()
GetDataVersion()
GetColumnCount()
GetRowCount()
GetOrderedColumns()
AddRow(System.String, System.Int32)
AddRows(System.Int32, System.String[], System.Int32)
RemoveRow(System.Int32)
RemoveRows(System.Int32, System.Int32)
AddColumn(GDX.Serializable/SerializableTypes, System.String, System.Int32)
RemoveColumn(GDX.Serializable/SerializableTypes, System.Int32)
SetString(System.Int32, System.Int32, System.String)
SetBool(System.Int32, System.Int32, System.Boolean)
SetChar(System.Int32, System.Int32, System.Char)
SetSByte(System.Int32, System.Int32, System.SByte)
SetByte(System.Int32, System.Int32, System.Byte)
SetShort(System.Int32, System.Int32, System.Int16)
SetUShort(System.Int32, System.Int32, System.UInt16)
SetInt(System.Int32, System.Int32, System.Int32)
SetUInt(System.Int32, System.Int32, System.UInt32)
SetLong(System.Int32, System.Int32, System.Int64)
SetULong(System.Int32, System.Int32, System.UInt64)
SetFloat(System.Int32, System.Int32, System.Single)
SetDouble(System.Int32, System.Int32, System.Double)
SetVector2(System.Int32, System.Int32, UnityEngine.Vector2)
SetVector3(System.Int32, System.Int32, UnityEngine.Vector3)
SetVector4(System.Int32, System.Int32, UnityEngine.Vector4)
SetVector2Int(System.Int32, System.Int32, UnityEngine.Vector2Int)
SetVector3Int(System.Int32, System.Int32, UnityEngine.Vector3Int)
SetQuaternion(System.Int32, System.Int32, UnityEngine.Quaternion)
SetRect(System.Int32, System.Int32, UnityEngine.Rect)
SetRectInt(System.Int32, System.Int32, UnityEngine.RectInt)
SetColor(System.Int32, System.Int32, UnityEngine.Color)
SetLayerMask(System.Int32, System.Int32, UnityEngine.LayerMask)
SetBounds(System.Int32, System.Int32, UnityEngine.Bounds)
SetBoundsInt(System.Int32, System.Int32, UnityEngine.BoundsInt)
SetHash128(System.Int32, System.Int32, UnityEngine.Hash128)
SetGradient(System.Int32, System.Int32, UnityEngine.Gradient)
SetAnimationCurve(System.Int32, System.Int32, UnityEngine.AnimationCurve)
SetObject(System.Int32, System.Int32, UnityEngine.Object)
GetString(System.Int32, System.Int32)
GetBool(System.Int32, System.Int32)
GetChar(System.Int32, System.Int32)
GetSByte(System.Int32, System.Int32)
GetByte(System.Int32, System.Int32)
GetShort(System.Int32, System.Int32)
GetUShort(System.Int32, System.Int32)
GetInt(System.Int32, System.Int32)
GetUInt(System.Int32, System.Int32)
GetLong(System.Int32, System.Int32)
GetULong(System.Int32, System.Int32)
GetFloat(System.Int32, System.Int32)
GetDouble(System.Int32, System.Int32)
GetVector2(System.Int32, System.Int32)
GetVector3(System.Int32, System.Int32)
GetVector4(System.Int32, System.Int32)
GetVector2Int(System.Int32, System.Int32)
GetVector3Int(System.Int32, System.Int32)
GetQuaternion(System.Int32, System.Int32)
GetRect(System.Int32, System.Int32)
GetRectInt(System.Int32, System.Int32)
GetColor(System.Int32, System.Int32)
GetLayerMask(System.Int32, System.Int32)
GetBounds(System.Int32, System.Int32)
GetBoundsInt(System.Int32, System.Int32)
GetHash128(System.Int32, System.Int32)
GetGradient(System.Int32, System.Int32)
GetAnimationCurve(System.Int32, System.Int32)
GetObject(System.Int32, System.Int32)
GetStringRef(System.Int32, System.Int32)
GetBoolRef(System.Int32, System.Int32)
GetCharRef(System.Int32, System.Int32)
GetSbyteRef(System.Int32, System.Int32)
GetByteRef(System.Int32, System.Int32)
GetShortRef(System.Int32, System.Int32)
GetUshortRef(System.Int32, System.Int32)
GetIntRef(System.Int32, System.Int32)
GetUintRef(System.Int32, System.Int32)
GetLongRef(System.Int32, System.Int32)
GetUlongRef(System.Int32, System.Int32)
GetFloatRef(System.Int32, System.Int32)
GetDoubleRef(System.Int32, System.Int32)
GetVector2Ref(System.Int32, System.Int32)
GetVector3Ref(System.Int32, System.Int32)
GetVector4Ref(System.Int32, System.Int32)
GetVector2IntRef(System.Int32, System.Int32)
GetVector3IntRef(System.Int32, System.Int32)
GetQuaternionRef(System.Int32, System.Int32)
GetRectRef(System.Int32, System.Int32)
GetRectIntRef(System.Int32, System.Int32)
GetColorRef(System.Int32, System.Int32)
GetLayerMaskRef(System.Int32, System.Int32)
GetBoundsRef(System.Int32, System.Int32)
GetBoundsIntRef(System.Int32, System.Int32)
GetHash128Ref(System.Int32, System.Int32)
GetGradientRef(System.Int32, System.Int32)
GetAnimationCurveRef(System.Int32, System.Int32)
GetObjectRef(System.Int32, System.Int32)
GetStringColumn(System.Int32)
GetBoolColumn(System.Int32)
GetCharColumn(System.Int32)
GetSbyteColumn(System.Int32)
GetByteColumn(System.Int32)
GetShortColumn(System.Int32)
GetUshortColumn(System.Int32)
GetIntColumn(System.Int32)
GetUintColumn(System.Int32)
GetLongColumn(System.Int32)
GetUlongColumn(System.Int32)
GetFloatColumn(System.Int32)
GetDoubleColumn(System.Int32)
GetVector2Column(System.Int32)
GetVector3Column(System.Int32)
GetVector4Column(System.Int32)
GetVector2IntColumn(System.Int32)
GetVector3IntColumn(System.Int32)
GetQuaternionColumn(System.Int32)
GetRectColumn(System.Int32)
GetRectIntColumn(System.Int32)
GetColorColumn(System.Int32)
GetLayerMaskColumn(System.Int32)
GetBoundsColumn(System.Int32)
GetBoundsIntColumn(System.Int32)
GetHash128Column(System.Int32)
GetGradientColumn(System.Int32)
GetAnimationCurveColumn(System.Int32)
GetObjectColumn(System.Int32)
AddColumnInternal[T](System.String, , GDX.Serializable/SerializableTypes, System.Int32)
RemoveColumnInternal[T](, GDX.Serializable/SerializableTypes, System.Int32)
InsertRowsOfTypeInternal[T](, System.Int32, System.Int32)
DeleteRowsOfTypeInternal[T](, System.Int32, System.Int32)
GetCellRef[T](System.Int32, System.Int32, )
GetCell[T](System.Int32, System.Int32, )
SetCell[T](System.Int32, System.Int32, , T)
GetColumn[T](System.Int32, )